﻿using AutoMapper;
using RestApp.UI.Core;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace RestApp.UI.Models
{
	public class JobTitle : IMvcView<RestApp.BusinessLogic.JobTitle>
	{
		public int Id { get; set; }

		[Display(Name="Название должности")]
		[Required(ErrorMessage = "*")]
		public string Name { get; set; }

		[Display(Name="Свободный график")]
		public bool CanBePenalted { get; set; }

		public BusinessLogic.JobTitle ToBusinessEntity()
		{
			return Mapper.Map<BusinessLogic.JobTitle>(this);
		}
	}
}